export function mapList(data) {
     // 递归遍历子节点 m_pittree  m_formworktree
    data.map((item, key) => {
        if ( item["m_"+item.type]) {
            item.children = item["m_"+item.type]
            item.iconSkin = "dam"
            delete item.m_pittree;
            delete item.m_formworktree;
            mapList(item.children)
        } else {
            return;
        }
    })
}

//  treeData 导出
export function treeFilter(data) {
    console.log(data,"\\//")
    let arr = Object.values(data);
    console.log(arr,"000")
    arr.map((item, key) => {
        item.iconSkin = "dam"
        if (item.children) {
            // item.children = [item.pittree, item.formworktree]
            // delete item.pittree;
            // delete item.formworktree;
            // console.log(item)
            // if (item.children) {
            //     mapList(item.children)
            // }
            mapList(item.children)
        }

    })

    return arr;
}